package cn.tedu.oop;

public class Test4_Private {
    public static void main(String[] args) {

        Student s = new Student();
        s.setName("长虫");

        System.out.println(s.getName());
    }
}
class Student{
    private String name;
    private int age;
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    private char gender;
    private String addr;
    private double score;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public void coding(){
        System.out.println("conding()...");
    }
    public void eat(){
        System.out.println("eat()...");
    }
}

